/*
 * @Author: your name
 * @Date: 2021-04-23 11:24:59
 * @LastEditTime: 2021-04-23 16:46:33
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \mobilephoneStyleb\store\index.js
 */

import Vue from "vue";
import Vuex from "vuex";
import state from "./state";
import mutations from "./mutations";
import getters from "./getters";
import actions from "./actions";
import createPersistedState from "vuex-persistedstate"
Vue.use(Vuex);
export default new Vuex.Store({
    // 数据
    state,
    // 方法
    mutations,
    // 当在一部分文本内容使用数据比较多的时候 使用getters
    getters,
    actions,
    // 加装的一个防止刷新改变数值的插件
    plugins: [createPersistedState({
        storage: window.sessionStorage
    })]


})